import Login from '@/views/index/index'
import Search from "@/views/search/search";
import courseDetail from "@/views/courseDetail/courseDetail";
import teacherDetail from "@/views/teacherDetail/teacherDetail";
import majorDetail from "@/views/majorDetail/majorDetail";
import major from "@/views/major/majors"
import blog from "@/views/blog/blog"
import blogId from "../views/blog/blogDetail/blogId";
import learner from "../views/courseLearner/learner";
import personalCenter from "../views/personalCenter/personalCenter"
import chat from "../views/chat/Main/Main"

export default [
    {
        path: '/',
        redirect: '/index'
    },
    {
        path: '/Login',
        redirect: '/index'
    },
    {
        path: '/index',
        component: Login
    },
    {
        path: '/search', //搜索页
        component: Search
    },
    {
        path: '/course', //课程页（不带id）
        redirect: '/'
    },
    {
        path: '/course/:courseId', //课程详情页
        component: courseDetail
    },
    {
        path: '/teacher', //讲师页（不带id）
        redirect: '/'
    },
    {
        path: '/teacher/:teacherId', //讲师详情页
        component: teacherDetail
    },
    {
        path: '/majors', //专业页（不带id）
        component: major
    },
    {
        path: '/major/:majorId', //专业详情页
        component: majorDetail
    },
    {
        path: "/blog",
        component: blog
    },
    {
        path: "/blog/:id",
        component: blogId
    },
    {
        path: "/learner/:courseId",
        component: learner
    },
    {
        path: "/personalCenter",
        component: personalCenter
    },
    {
        path: "/chat",
        component: chat
    },
    {
        path: '/exam/:examId',
        name: 'exam',
        component: () => import('../views/exam/examPage/ExamPage')
    },
    {
        path: '/myQuestionBank',
        component: () => import('../views/exam/myQuestionBank/MyQuestionBank')
    },
    {
        path: '/train/:bankId/:trainType',
        name: 'trainPage',
        component: () => import('../views/exam/trainPage/TrainPage')
    },
    {
        path: '/examOnline',
        component: () => import('../views/exam/examOnline/ExamOnline')
    },
    {
        path: '/examResult/:recordId',
        name: 'examResult',
        component: () => import('../views/exam/examResult/ExamResult')
    },
    {
        path: '/myGrade',
        component: () => import('../views/exam/myGrade/MyGrade')
    }

]